package com.lanou.service.impl;

import com.lanou.entity.TbContent;
import com.lanou.entity.TbContentExample;
import com.lanou.mapper.TbContentMapper;
import com.lanou.service.TbContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by QuChao on 2018/11/11
 */
@Service
public class TbContentServiceImpl implements TbContentService {
    @Autowired
    private TbContentMapper tbContentMapper;

    @Override
    public Map<String, Object> findAll() {
        TbContentExample tbContentExample = new TbContentExample();
        tbContentExample.createCriteria();
        List<TbContent> tbContents = tbContentMapper.selectByExampleWithBLOBs(tbContentExample);
        Map<String, Object> map = new HashMap<>();
        map.put("rows", tbContents);
        return map;
    }
}
